#include <iostream>
using namespace std;
int main()
{
    int num;
    bool num_range_judge, devide_by_2_judge; // true / false
    cin >> num;
    if ((num > 4) && (num <= 12))
    {
        num_range_judge = 1;
    }
    else
    {
        num_range_judge = 0;
    }
    if (num % 2 == 0)
    {
        devide_by_2_judge = 1;
    }
    else
    {
        devide_by_2_judge = 0;
    }

    printf(
        "%d %d %d %d",
        (num_range_judge && devide_by_2_judge),
        (num_range_judge || devide_by_2_judge),
        ((num_range_judge && !devide_by_2_judge) || (!num_range_judge && devide_by_2_judge)),
        (!num_range_judge && !devide_by_2_judge));

    return 0;
}